/*#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
void fan(int  x[200], char a[200],int n)
{
	int i, j;

	for (i = 0; i < n; i++)
		x[i] = a[n - i-1] - '0';
}

int main()
{

	int n;
	scanf("%d", &n);
	while (n)
	{
		char a[200] = { 0 };
		char b[200] = { 0 };
		int x[200] = { 0 }, y[200] = { 0 };
		int sum[202] = { 0 };
		int count1 = 0, count2 = 0, i = 0, j = 0;
		scanf("%s%s", a,b);
		
		count1 = strlen(a);
		count2 = strlen(b);
		fan(x, a,count1);
		fan(y, b, count2);
		int max = 0;
		if (count1 >= count2)
			max = count1;
		else
			max = count2;
		for (i = 0; i < max + 1; i++)
		{
			sum[i] += x[i] + y[i];
			if (sum[i] >= 10)
			{
				sum[i + 1]++;
				sum[i] %= 10;
			}
		}
		if (sum[max] != 1)
		{
			sum[max] = '\0';
			for (i = max - 1; i >= 0; i--)
				printf("%d", sum[i]);
			printf("\n");
		}
		else
		{
			sum[max + 1] = '\0';
			for (i = max ; i >= 0; i--)
				printf("%d", sum[i]);
			printf("\n");
		}

		
	
		n--;
	}
	return 0;
}*/